package com.white.commonlib.engine;

/**
 * Created by ytf on 2017/6/1 001.
 * Description:
 */
public class ApiDecoder
{
    private static String codes[] = {
            "Android-1.0","Android-1.1","Android-1.5","Android-1.6",
            "Android-2.0","Android-2.0.1","Android-2.1","Android-2.2x",
            "Android-2.3-2.3.2","Android-2.3.3-2.3.7","Android-3.0","Android-3.1",
            "Android-3.2","Android-4.0.1-4.0.2","Android-4.0.3-4.0.4","Android-4.1x",
            "Android-4.2x","Android-4.3x","Android-4.4-4.4.4","Android-NONAME",
            "Android-5.0","Android-5.1","Android-6.0","Android-7.0","Android-7.1.1", "Android-8.0"};

    public static String getVersionName(int code)
    {
        if(code > 0 && code <27)
        {
            return codes[code - 1] + " -> code " + code;
        }else
        {
            return String.valueOf(code);
        }
    }
}
